Email Templates |
Create a link to the manager's Actions page in WX
To create a link in an email template that directly links to the manager's Actions page in WX:
-
Create a manager ID field on the object launching the email:
-
Go to Setup > Object Manager, and select the object where you want to have the manager ID field available.
-
From the sidebar, select Fields & Relationships.
-
Select New.
-
For the new field, select or enter the following details:
-
For Data Type, select Formula.
-
Give a name to the field, such as Manager ID.
-
Then for the Formula Return Type, select Text.
-
Paste the following formula in the formula text box:
CopyGetting the manager's Salesforce ID
CASESAFEID(fHCM2__Employment__r.fHCM2__Team_Member__r.fHCM2__Manager__c)
Consider the relationships between objects when adding the merge field to the formula. This
-
Define the field level security for the field and choose if you want to add it to page layouts.
-
Select Save.
-
Create an action link field on the object launching the email:
-
On the same object where you created the manager ID field, select New, and select or enter the following details:
-
For Data Type, select Formula.
-
Give a name to the field, such as Action Link.
-
Then for the Formula Return Type, select Text.
-
Construct the URL in the formula text box as follows, replacing
<my-domain-name>
with the org's My Domain Name:CopyConstructing manager Actions URL
'https://<my-domain-name>--fhcm2.vf.force.com/apex/fHCM2__CollaborationPortalIndex?id'
& Manager_ID__c &
'#/teammember/' &
Manager_ID__c &
'/actions' -
Define the field level security for the field and choose if you want to add it to page layouts.
-
Select Save.
-
-
Add the action link custom field to the email template:
- Go to Setup, and in Quick Find enter email, and select Classic Email Templates from the search results.
- Select the Email Template Name of the template you want to add the link to.
- Select Edit HTML version.
- Select Select Field Type and choose the object from where the email is triggered.
-
Select Select Field field and choose the action link field you created.
-
Copy the text from the Copy Merge Field Value field:
-
In the text of the email template, highlight the text you want to use as a hyperlink to WX and then select the hyperlink icon on the Formatting Controls menu bar:
-
Paste the text you previously copied from Copy Merge Field Value field into the field for the link. Select OK and then Save: